package com.ymatou.iapi.payment.testcase;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.experimental.categories.Category;

import com.google.gson.JsonArray;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
import com.ymatou.iapi.payment.parameter.AcquireOrderBean;
import com.ymatou.iapi.payment.parameter.AcquireRefundBean;
import com.ymatou.iapi.payment.parameter.QueryByTradingIdListBean;
import com.ymatou.iapi.payment.service.QueryByTradingIdListCall;
import com.ymt.core.tool.FormatUtil;
import com.ymt.core.tool.Logger;
import com.ymt.utils.annotation.*;
import com.ymt.utils.tag.*;
import com.ymttest.business.service.PayGateWayCallService;
import com.ymttest.database.model.MPayment;
import com.ymttest.database.model.MRefund;
import com.ymttest.database.sqlwapper.PayGateWayWapper;

/**
 * 支付查询批量 FreeMaker Template自动生成代码
 */
@TestSuite
public class Ts_QueryByTradingIdList {
	private static QueryByTradingIdListBean querybytradingidlistBean;
	private static QueryByTradingIdListCall querybytradingidlistCall;

	@BeforeClass
	public static void setUp() {
		Logger.createResultFile("支付查询批量");
	}

	@Before
	public void caseUp() {
		querybytradingidlistBean = new QueryByTradingIdListBean();
		querybytradingidlistCall = new QueryByTradingIdListCall();
	}

	@AfterClass
	public static void tearDown() {
		Logger.generateResult(querybytradingidlistCall.getOpurl());
	}

	@After
	public void caseDown() {
		Logger.end();
	}

	private void verifyDB(AcquireOrderBean aqb, JsonObject result, String discountAmt) throws Exception {
		Logger.comment("验证数据库");
		PayGateWayWapper paymentwapper = new PayGateWayWapper();
		MPayment ppm = paymentwapper.selectPaymentByTradingid(aqb.getOrderId()).get(0);
		Logger.verifyEquals(result.get("PaymentId").getAsString(), ppm.getPaymentId(), "验证PaymentId");
		Logger.verifyEquals(result.get("PayType").getAsString(), ppm.getPayType().toString(), "验证PayType");
		Logger.verifyEquals(result.get("PayStatus").getAsInt(), ppm.getPayStatus(), "验证PayStatus");
		if (ppm.getInstitutionPaymentId() != null && ppm.getInstitutionPaymentId().length() > 0) {
			Logger.verifyEquals(result.get("InstitutionPaymentId").getAsString(), ppm.getInstitutionPaymentId(), "验证InstitutionPaymentId");
		}
//		Logger.verifyEquals(result.get("MerchantId").getAsString(), PayGateWayCallService.getMerchantId(aqb.getPayType()),"验证MerchantId");
		Logger.verifyEquals(new BigDecimal(result.get("OrderAmt").toString()).setScale(2), ppm.getOrderAmt().setScale(2), "验证PayPrice");
		Logger.verifyEquals(new BigDecimal(result.get("DiscountAmt").toString()).setScale(2), ppm.getDiscountAmt().setScale(2), "验证DiscountAmt");
		Logger.verifyEquals(new BigDecimal(discountAmt).setScale(2), ppm.getDiscountAmt().setScale(2), "验证入参DiscountAmt");
		Logger.verifyEquals(result.get("TradingId").getAsString(), ppm.getTradingId(), "验证TradingId");
//		Logger.verifyEquals(result.get("MerchantId").getAsString(), ppm.getMerchantNo(), "验证MerchantId");
		Logger.verifyEquals(result.get("MerchantId").getAsString(), PayGateWayCallService.getMerchantId(aqb.getPayType()),"验证MerchantId");
	}

	@Test
	@Category({ P1.class })
	@TestCase
	public void Tc_QueryByTradingIdList_001() {
		Logger.start(true, "支付查询批量成功,待支付记录");
		try {
			AcquireOrderBean aqb = PayGateWayCallService.initAcquireOrder("10");
			PayGateWayCallService.acquireOrder(aqb);
			// PayGateWayCallService.notifyCall(aqb);
			// AcquireRefundBean ar = PayGateWayCallService.AcquireRefund(aqb,
			// aqb.getPayPrice());
			// PayGateWayCallService.approveRefund(ar.getTradeNo());
			// PayGateWayWapper paymentwapper = new PayGateWayWapper();
			// MPayment ppm = new
			// PayGateWayWapper().selectPaymentByTradingid(aqb.getOrderId()).get(0);
			// String trandno = ppm.getPaymentId();
			// List<MRefund> mlist =
			// paymentwapper.selectRefundRequestByPaymentId(trandno);
			// PayGateWayCallService.executeRefund(mlist.get(0), "10");
			List<String> TradingIdList = new ArrayList<String>();
			TradingIdList.add(aqb.getOrderId());
			querybytradingidlistBean.setTradingIdList(TradingIdList);
			querybytradingidlistCall.setData(querybytradingidlistBean);
			querybytradingidlistCall.callService();
			Logger.verifyEquals("true", querybytradingidlistCall.getString("IsSuccess"), "验证IsSuccess");
			Logger.verifyEquals("0", querybytradingidlistCall.getString("ErrorCode"), "验证ErrorCode");
			querybytradingidlistCall.getJsonObject().get("Result").getAsJsonArray().forEach(result -> {
				try {
					verifyDB(aqb, result.getAsJsonObject(), "0");
				} catch (Exception e) {
					e.printStackTrace();
				}
			});

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category({ P2.class })
	@TestCase
	public void Tc_QueryByTradingIdList_002() {
		Logger.start(true, "不输入TradingIdList参数失败");
		try {
			querybytradingidlistCall.setData(querybytradingidlistBean);
			querybytradingidlistCall.callService();
			Logger.verifyEquals("false", querybytradingidlistCall.getString("IsSuccess"), "验证IsSuccess");
			Logger.verifyEquals("1000", querybytradingidlistCall.getString("ErrorCode"), "验证ErrorCode");
		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category({ P2.class })
	@TestCase
	public void Tc_QueryByTradingIdList_003() {
		Logger.start(true, "查询多条记录成功");
		try {
			int count = 5;
			List<String> TradingIdList = new ArrayList<String>();
			Map<String, AcquireOrderBean> aqbmap = new HashMap<String, AcquireOrderBean>();
			for (int i = 0; i < count; i++) {
				AcquireOrderBean aqb = PayGateWayCallService.initAcquireOrder("10");
				PayGateWayCallService.acquireOrder(aqb);
				TradingIdList.add(aqb.getOrderId());
				aqbmap.put(PayGateWayCallService.getPaymentId(aqb), aqb);
			}
			Logger.debug("map:" + FormatUtil.beanToGSONString(aqbmap));
			Thread.sleep(5000);
			querybytradingidlistBean.setTradingIdList(TradingIdList);
			querybytradingidlistCall.setData(querybytradingidlistBean);
			querybytradingidlistCall.callService();
			Logger.verifyEquals("true", querybytradingidlistCall.getString("IsSuccess"), "验证IsSuccess");
			Logger.verifyEquals("0", querybytradingidlistCall.getString("ErrorCode"), "验证ErrorCode");
			JsonArray arrayresult = querybytradingidlistCall.getJsonObject().get("Result").getAsJsonArray();// .forEach(result->{
			for (JsonElement jsonElement : arrayresult) {
				JsonObject result = jsonElement.getAsJsonObject();
				try {
					String pid = result.get("PaymentId").getAsString();
					AcquireOrderBean taqb = aqbmap.get(pid);
					verifyDB(taqb, result.getAsJsonObject(), "0");
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category({ P2.class })
	@TestCase
	public void Tc_QueryByTradingIdList_004() {
		Logger.start(true, "查询记录成功,已支付记录");
		try {
			AcquireOrderBean aqb = PayGateWayCallService.initAcquireOrder("10");
			PayGateWayCallService.acquireOrder(aqb);
			PayGateWayCallService.notifyCall(aqb);
			// AcquireRefundBean ar = PayGateWayCallService.AcquireRefund(aqb,
			// aqb.getPayPrice());
			// PayGateWayCallService.approveRefund(ar.getTradeNo());
			// PayGateWayWapper paymentwapper = new PayGateWayWapper();
			// MPayment ppm = new
			// PayGateWayWapper().selectPaymentByTradingid(aqb.getOrderId()).get(0);
			// String trandno = ppm.getPaymentId();
			// List<MRefund> mlist =
			// paymentwapper.selectRefundRequestByPaymentId(trandno);
			// PayGateWayCallService.executeRefund(mlist.get(0), "10");
			List<String> TradingIdList = new ArrayList<String>();
			TradingIdList.add(aqb.getOrderId());
			querybytradingidlistBean.setTradingIdList(TradingIdList);
			querybytradingidlistCall.setData(querybytradingidlistBean);
			querybytradingidlistCall.callService();
			Logger.verifyEquals("true", querybytradingidlistCall.getString("IsSuccess"), "验证IsSuccess");
			Logger.verifyEquals("0", querybytradingidlistCall.getString("ErrorCode"), "验证ErrorCode");
			querybytradingidlistCall.getJsonObject().get("Result").getAsJsonArray().forEach(result -> {
				try {
					verifyDB(aqb, result.getAsJsonObject(), "0");
				} catch (Exception e) {
					e.printStackTrace();
				}
			});

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category({ P2.class })
	@TestCase
	public void Tc_QueryByTradingIdList_005() {
		Logger.start(true, "查询记录成功,有退款记录");
		try {
			AcquireOrderBean aqb = PayGateWayCallService.initAcquireOrder("10");
			PayGateWayCallService.acquireOrder(aqb);
			PayGateWayCallService.notifyCall(aqb);
			AcquireRefundBean ar = PayGateWayCallService.AcquireRefund(aqb, aqb.getPayPrice());
			PayGateWayCallService.approveRefund(ar.getTradeNo());
			PayGateWayWapper paymentwapper = new PayGateWayWapper();
			MPayment ppm = new PayGateWayWapper().selectPaymentByTradingid(aqb.getOrderId()).get(0);
			String trandno = ppm.getPaymentId();
			List<MRefund> mlist = paymentwapper.selectRefundRequestByPaymentId(trandno);
			PayGateWayCallService.executeRefund(mlist.get(0), "10");
			List<String> TradingIdList = new ArrayList<String>();
			TradingIdList.add(aqb.getOrderId());
			querybytradingidlistBean.setTradingIdList(TradingIdList);
			querybytradingidlistCall.setData(querybytradingidlistBean);
			querybytradingidlistCall.callService();
			Logger.verifyEquals("true", querybytradingidlistCall.getString("IsSuccess"), "验证IsSuccess");
			Logger.verifyEquals("0", querybytradingidlistCall.getString("ErrorCode"), "验证ErrorCode");
			querybytradingidlistCall.getJsonObject().get("Result").getAsJsonArray().forEach(result -> {
				try {
					verifyDB(aqb, result.getAsJsonObject(), "0");
				} catch (Exception e) {
					e.printStackTrace();
				}
			});
		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category({ P2.class })
	@TestCase
	public void Tc_QueryByTradingIdList_006() {
		Logger.start(true, "查询有优惠金额记录");
		try {
			AcquireOrderBean aqb = PayGateWayCallService.initAcquireOrder("50");
			aqb.setPayPrice("6.00");
			PayGateWayCallService.acquireOrder(aqb);
			String discountAmt = "1.00";
			PayGateWayCallService.notifyCall50(aqb, discountAmt);
			List<String> TradingIdList = new ArrayList<String>();
			TradingIdList.add(aqb.getOrderId());
			querybytradingidlistBean.setTradingIdList(TradingIdList);
			querybytradingidlistCall.setData(querybytradingidlistBean);
			querybytradingidlistCall.callService();
			Logger.verifyEquals("true", querybytradingidlistCall.getString("IsSuccess"), "验证IsSuccess");
			Logger.verifyEquals("0", querybytradingidlistCall.getString("ErrorCode"), "验证ErrorCode");
			querybytradingidlistCall.getJsonObject().get("Result").getAsJsonArray().forEach(result -> {
				try {
					verifyDB(aqb, result.getAsJsonObject(), "1");
				} catch (Exception e) {
					e.printStackTrace();
				}
			});
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category({ P2.class })
	@TestCase
	public void Tc_QueryByTradingIdList_007() {
		Logger.start(true, "查询记录成功,有appid");
		try {
			AcquireOrderBean aqb = PayGateWayCallService.initAcquireOrder("17");
			PayGateWayCallService.acquireOrder(aqb);
			PayGateWayCallService.notifyCall(aqb);
			String appid=PayGateWayCallService.WX_AppID;//17
//			AcquireRefundBean ar = PayGateWayCallService.AcquireRefund(aqb, aqb.getPayPrice());
//			PayGateWayCallService.approveRefund(ar.getTradeNo());
//			PayGateWayWapper paymentwapper = new PayGateWayWapper();
//			MPayment ppm = new PayGateWayWapper().selectPaymentByTradingid(aqb.getOrderId()).get(0);
//			String trandno = ppm.getPaymentId();
//			List<MRefund> mlist = paymentwapper.selectRefundRequestByPaymentId(trandno);
//			PayGateWayCallService.executeRefund(mlist.get(0), "10");
			List<String> TradingIdList = new ArrayList<String>();
			TradingIdList.add(aqb.getOrderId());
			querybytradingidlistBean.setTradingIdList(TradingIdList);
			querybytradingidlistCall.setData(querybytradingidlistBean);
			querybytradingidlistCall.callService();
			Logger.verifyEquals("true", querybytradingidlistCall.getString("IsSuccess"), "验证IsSuccess");
			Logger.verifyEquals("0", querybytradingidlistCall.getString("ErrorCode"), "验证ErrorCode");
			querybytradingidlistCall.getJsonObject().get("Result").getAsJsonArray().forEach(result -> {
				try {
					verifyDB(aqb, result.getAsJsonObject(), "0",appid);
				} catch (Exception e) {
					e.printStackTrace();
				}
			});
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category({ P1.class })
	@TestCase
	public void Tc_QueryByTradingIdList_008() {
		Logger.start(true, "支付查询批量成功,待支付记录-type6000");
		try {
			AcquireOrderBean aqb = PayGateWayCallService.initAcquireOrder("6000");
			PayGateWayCallService.acquireOrder(aqb);
			List<String> TradingIdList = new ArrayList<String>();
			TradingIdList.add(aqb.getOrderId());
			querybytradingidlistBean.setTradingIdList(TradingIdList);
			querybytradingidlistCall.setData(querybytradingidlistBean);
			querybytradingidlistCall.callService();
			Logger.verifyEquals("true", querybytradingidlistCall.getString("IsSuccess"), "验证IsSuccess");
			Logger.verifyEquals("0", querybytradingidlistCall.getString("ErrorCode"), "验证ErrorCode");
			querybytradingidlistCall.getJsonObject().get("Result").getAsJsonArray().forEach(result -> {
				try {
					verifyDB(aqb, result.getAsJsonObject(), "0");
				} catch (Exception e) {
					e.printStackTrace();
				}
			});

		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category({ P1.class })
	@TestCase
	public void Tc_QueryByTradingIdList_009() {
		Logger.start(true, "支付查询批量成功,待支付记录-type2013抖音");
		try {
			AcquireOrderBean aqb = PayGateWayCallService.initAcquireOrder("2013");
			PayGateWayCallService.acquireOrder(aqb);
			List<String> TradingIdList = new ArrayList<String>();
			TradingIdList.add(aqb.getOrderId());
			querybytradingidlistBean.setTradingIdList(TradingIdList);
			querybytradingidlistCall.setData(querybytradingidlistBean);
			querybytradingidlistCall.callService();
			Logger.verifyEquals("true", querybytradingidlistCall.getString("IsSuccess"), "验证IsSuccess");
			Logger.verifyEquals("0", querybytradingidlistCall.getString("ErrorCode"), "验证ErrorCode");
			querybytradingidlistCall.getJsonObject().get("Result").getAsJsonArray().forEach(result -> {
				try {
					verifyDB(aqb, result.getAsJsonObject(), "0");
				} catch (Exception e) {
					e.printStackTrace();
				}
			});

		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category({ P1.class })
	@TestCase
	public void Tc_QueryByTradingIdList_010() {
		Logger.start(true, "支付查询批量成功,待支付记录-6010盛付通微信小程序");
		try {
			AcquireOrderBean aqb = PayGateWayCallService.initAcquireOrder("6010");
			PayGateWayCallService.acquireOrder(aqb);
			List<String> TradingIdList = new ArrayList<String>();
			TradingIdList.add(aqb.getOrderId());
			querybytradingidlistBean.setTradingIdList(TradingIdList);
			querybytradingidlistCall.setData(querybytradingidlistBean);
			querybytradingidlistCall.callService();
			Logger.verifyEquals("true", querybytradingidlistCall.getString("IsSuccess"), "验证IsSuccess");
			Logger.verifyEquals("0", querybytradingidlistCall.getString("ErrorCode"), "验证ErrorCode");
			querybytradingidlistCall.getJsonObject().get("Result").getAsJsonArray().forEach(result -> {
				try {
					verifyDB(aqb, result.getAsJsonObject(), "0");
				} catch (Exception e) {
					e.printStackTrace();
				}
			});

		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category({ P1.class })
	@TestCase
	public void Tc_QueryByTradingIdList_011() {
		Logger.start(true, "支付查询批量成功,待支付记录-6006代购神器HipoPayAliWap");
		try {
			AcquireOrderBean aqb = PayGateWayCallService.initAcquireOrder("6006");
			PayGateWayCallService.acquireOrder(aqb);
			List<String> TradingIdList = new ArrayList<String>();
			TradingIdList.add(aqb.getOrderId());
			querybytradingidlistBean.setTradingIdList(TradingIdList);
			querybytradingidlistCall.setData(querybytradingidlistBean);
			querybytradingidlistCall.callService();
			Logger.verifyEquals("true", querybytradingidlistCall.getString("IsSuccess"), "验证IsSuccess");
			Logger.verifyEquals("0", querybytradingidlistCall.getString("ErrorCode"), "验证ErrorCode");
			querybytradingidlistCall.getJsonObject().get("Result").getAsJsonArray().forEach(result -> {
				try {
					verifyDB(aqb, result.getAsJsonObject(), "0");
				} catch (Exception e) {
					e.printStackTrace();
				}
			});

		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category({ P1.class })
	@TestCase
	public void Tc_QueryByTradingIdList_012() {
		Logger.start(true, "支付查询批量成功,待支付记录-6100GodAliPayPc");
		try {
			AcquireOrderBean aqb = PayGateWayCallService.initAcquireOrder("6100");
			PayGateWayCallService.acquireOrder(aqb);
			List<String> TradingIdList = new ArrayList<String>();
			TradingIdList.add(aqb.getOrderId());
			querybytradingidlistBean.setTradingIdList(TradingIdList);
			querybytradingidlistCall.setData(querybytradingidlistBean);
			querybytradingidlistCall.callService();
			Logger.verifyEquals("true", querybytradingidlistCall.getString("IsSuccess"), "验证IsSuccess");
			Logger.verifyEquals("0", querybytradingidlistCall.getString("ErrorCode"), "验证ErrorCode");
			querybytradingidlistCall.getJsonObject().get("Result").getAsJsonArray().forEach(result -> {
				try {
					verifyDB(aqb, result.getAsJsonObject(), "0");
				} catch (Exception e) {
					e.printStackTrace();
				}
			});

		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category({ P1.class })
	@TestCase
	public void Tc_QueryByTradingIdList_013() {
		Logger.start(true, "支付查询批量成功,待支付记录-type6103");
		try {
			AcquireOrderBean aqb = PayGateWayCallService.initAcquireOrder("6103");
			PayGateWayCallService.acquireOrder(aqb);
			List<String> TradingIdList = new ArrayList<String>();
			TradingIdList.add(aqb.getOrderId());
			querybytradingidlistBean.setTradingIdList(TradingIdList);
			querybytradingidlistCall.setData(querybytradingidlistBean);
			querybytradingidlistCall.callService();
			Logger.verifyEquals("true", querybytradingidlistCall.getString("IsSuccess"), "验证IsSuccess");
			Logger.verifyEquals("0", querybytradingidlistCall.getString("ErrorCode"), "验证ErrorCode");
			querybytradingidlistCall.getJsonObject().get("Result").getAsJsonArray().forEach(result -> {
				try {
					verifyDB(aqb, result.getAsJsonObject(), "0");
				} catch (Exception e) {
					e.printStackTrace();
				}
			});

		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category({ P1.class })
	@TestCase
	public void Tc_QueryByTradingIdList_014() {
		Logger.start(true, "支付查询批量成功,待支付记录-type6107");
		try {
			AcquireOrderBean aqb = PayGateWayCallService.initAcquireOrder("6107");
			PayGateWayCallService.acquireOrder(aqb);
			List<String> TradingIdList = new ArrayList<String>();
			TradingIdList.add(aqb.getOrderId());
			querybytradingidlistBean.setTradingIdList(TradingIdList);
			querybytradingidlistCall.setData(querybytradingidlistBean);
			querybytradingidlistCall.callService();
			Logger.verifyEquals("true", querybytradingidlistCall.getString("IsSuccess"), "验证IsSuccess");
			Logger.verifyEquals("0", querybytradingidlistCall.getString("ErrorCode"), "验证ErrorCode");
			querybytradingidlistCall.getJsonObject().get("Result").getAsJsonArray().forEach(result -> {
				try {
					verifyDB(aqb, result.getAsJsonObject(), "0");
				} catch (Exception e) {
					e.printStackTrace();
				}
			});

		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	private void verifyDB(AcquireOrderBean aqb, JsonObject result, String discountAmt,String appid) throws InterruptedException {
		Logger.comment("验证数据库");
		PayGateWayWapper paymentwapper = new PayGateWayWapper();
		MPayment ppm = paymentwapper.selectPaymentByTradingid(aqb.getOrderId()).get(0);
		Logger.verifyEquals(result.get("PaymentId").getAsString(), ppm.getPaymentId(), "验证PaymentId");
		Logger.verifyEquals(result.get("PayType").getAsString(), ppm.getPayType().toString(), "验证PayType");
		Logger.verifyEquals(result.get("PayStatus").getAsInt(), ppm.getPayStatus(), "验证PayStatus");
		if (ppm.getInstitutionPaymentId() != null && ppm.getInstitutionPaymentId().length() > 0) {
			Logger.verifyEquals(result.get("InstitutionPaymentId").getAsString(), ppm.getInstitutionPaymentId(), "验证InstitutionPaymentId");
		}
		Logger.verifyEquals(result.get("MerchantId").getAsString(), PayGateWayCallService.getMerchantId(aqb.getPayType()),"验证MerchantId");
		Logger.verifyEquals(new BigDecimal(result.get("OrderAmt").toString()).setScale(2), ppm.getOrderAmt().setScale(2), "验证PayPrice");
		Logger.verifyEquals(new BigDecimal(result.get("DiscountAmt").toString()).setScale(2), ppm.getDiscountAmt().setScale(2), "验证DiscountAmt");
		Logger.verifyEquals(new BigDecimal(discountAmt).setScale(2), ppm.getDiscountAmt().setScale(2), "验证入参DiscountAmt");
		Logger.verifyEquals(result.get("TradingId").getAsString(), ppm.getTradingId(), "验证TradingId");
		Logger.verifyEquals(result.get("MerchantId").getAsString(), ppm.getMerchantNo(), "验证MerchantId");
		//这里跟着disconf的配置走
		Logger.verifyEquals(result.get("AppId").getAsString(), appid, "验证appid");
	}
}